{% extends 'layout.html' %}
{% block body %}
    <form method="post" class="bookmark-form">
        {% if error %}
            <p class="error">{{ error }}</p>
        {% endif %}
        <div class="form-group">
            <label for="title">标题</label>

            <div class="control">
                <input type="text" id="title" name="title" value="{{ bookmark.title }}">
            </div>
        </div>
        <div class="form-group">
            <label for="url">Url</label>

            <div class="control">
                <input type="text" id="url" name="url" placeholder="http://" value="{{ bookmark.url }}">
            </div>
        </div>
        <div class="form-group">
            <label for="tags">标签</label>

            <div class="control">
                <input type="text" id="tags" name="tags" value="{{ ', '.join(bookmark.tag_names) }}">
            </div>
        </div>
        <div class="form-group form-actions">
            <button type="submit">添加</button>
        </div>
    </form>
{% endblock %}